﻿using System.Collections.Generic;

namespace System
{
	public static class IntExtension
	{
		public static IEnumerable<T> Stock<T>(this int i, Func<int, T> func)
		{
			for (int j = 0; j < i; j++)
				yield return func(j);
		}

		public static IEnumerable<T> Stock<T>(this int i, Func<T> func)
		{
			for (int j = 0; j < i; j++)
				yield return func();
		}
	}
}